Telegram Group & Telegram Channel
Semolina Code (Python / TypeScript)
Конкурс Сейчас один знакомый написал, что в web3 софтах на JS/TS нельзя добавить прокси к rpc вызовам Пробовал на либах web3.js, ethers.js, viem Мб тут есть сильные JSеры, которые смогут показать пример как добавить http прокси в одну из библиотек (web3.js…
Конкурс закрывается

Победитель @fraggdiller 🏆
https://www.oklink.com/ru/arbitrum/tx/0x6d0e1196aef639b2b2f6aa75bab962ab9fe626bfee233e15d0ce61ee129f2940

Получилось прикрутить прокси к ethers.js:

import { HttpsProxyAgent } from 'https-proxy-agent';
import { ethers } from 'ethers';

(async () => {
const proxy = '';
const rpc = '';

let fetchRequest: ethers.FetchRequest;
const agent = new HttpsProxyAgent(proxy);

fetchRequest = new ethers.FetchRequest(rpc);
// fetchRequest.setHeader('user-agent', userAgent);
fetchRequest.getUrlFunc = ethers.FetchRequest.createGetUrlFunc({ agent: agent });

let provider = new ethers.JsonRpcProvider(fetchRequest);
console.log(await provider.getBlockNumber());
})();


SemolinaCode | Chat | YouTube | Arbuzers | HowToCode | Prop



tg-me.com/semolina_code_python/87
Create:
Last Update:

Конкурс закрывается

Победитель @fraggdiller 🏆
https://www.oklink.com/ru/arbitrum/tx/0x6d0e1196aef639b2b2f6aa75bab962ab9fe626bfee233e15d0ce61ee129f2940

Получилось прикрутить прокси к ethers.js:


import { HttpsProxyAgent } from 'https-proxy-agent';
import { ethers } from 'ethers';

(async () => {
const proxy = '';
const rpc = '';

let fetchRequest: ethers.FetchRequest;
const agent = new HttpsProxyAgent(proxy);

fetchRequest = new ethers.FetchRequest(rpc);
// fetchRequest.setHeader('user-agent', userAgent);
fetchRequest.getUrlFunc = ethers.FetchRequest.createGetUrlFunc({ agent: agent });

let provider = new ethers.JsonRpcProvider(fetchRequest);
console.log(await provider.getBlockNumber());
})();


SemolinaCode | Chat | YouTube | Arbuzers | HowToCode | Prop

BY Semolina Code (Python / TypeScript)


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/semolina_code_python/87

View MORE
Open in Telegram


Semolina Code Python TypeScript Telegram | DID YOU KNOW?

Date: |

How to Invest in Bitcoin?

Like a stock, you can buy and hold Bitcoin as an investment. You can even now do so in special retirement accounts called Bitcoin IRAs. No matter where you choose to hold your Bitcoin, people’s philosophies on how to invest it vary: Some buy and hold long term, some buy and aim to sell after a price rally, and others bet on its price decreasing. Bitcoin’s price over time has experienced big price swings, going as low as $5,165 and as high as $28,990 in 2020 alone. “I think in some places, people might be using Bitcoin to pay for things, but the truth is that it’s an asset that looks like it’s going to be increasing in value relatively quickly for some time,” Marquez says. “So why would you sell something that’s going to be worth so much more next year than it is today? The majority of people that hold it are long-term investors.”

Unlimited members in Telegram group now

Telegram has made it easier for its users to communicate, as it has introduced a feature that allows more than 200,000 users in a group chat. However, if the users in a group chat move past 200,000, it changes into "Broadcast Group", but the feature comes with a restriction. Groups with close to 200k members can be converted to a Broadcast Group that allows unlimited members. Only admins can post in Broadcast Groups, but everyone can read along and participate in group Voice Chats," Telegram added.

Semolina Code Python TypeScript from us


Telegram Semolina Code (Python / TypeScript)
FROM USA